from django import forms as forms
from django.forms import ModelForm

from extKronowin.models import Grup2ghap, Franja2ghap

#https://docs.djangoproject.com/en/1.2/topics/http/file-uploads/
class sincronitzaKronowinForm(forms.Form):
    fitxer_kronowin = forms.FileField(required=True)
    
class Kronowin2ghapGrupForm(ModelForm):

    
    class Meta:
        model = Grup2ghap
        fields = ('grup_kronowin', 'grup_ghap' )
        widgets = {
            'grup_kronowin': forms.TextInput(attrs={'readonly': True}),
        }
    
        
class Kronowin2ghapFranjaForm(ModelForm):
    class Meta:
        model = Franja2ghap
        fields = ('franja_kronowin', 'franja_ghap' )
        widgets = {
            'franja_kronowin': forms.TextInput(attrs={'readonly': True}),
        }            